<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <title>layui在线调试</title>
    <link rel="stylesheet" th:href="@{/webjars/layui/2.5.4/css/layui.css}" href="//res.layui.com/layui/dist/css/layui.css?t=1568076536509" media="all">
    <link rel="stylesheet" type="text/css" th:href="@{/css2/H-ui.admin.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/H-ui.min.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/iconfont.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/skin.css}" id="skin" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/jquery.contextMenu.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/style.css}"/>

    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skins" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
</head>
<body>
<div class="page-container">

    <div class="page-container">
        <div class="mt-20">
            <table id = "tbo" class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th width="40">费用ID</th>
                    <th width="40">房屋ID</th>
                    <th width="80">门牌编号</th>
                    <th width="100">费用类型</th>
                    <th width="100">开始时间</th>
                    <th width="100">结束时间</th>
                    <th width="150">金额</th>
                    <th width="150">记录人</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="hh:${costlist}">
                    <td  th:text="${hh.c_id}"></td>
                    <td  th:text="${hh.house.h_id}"></td>
                    <th  th:text="${hh.house.h_number}"></th>
                    <th  th:text="${hh.c_costName}"></th>
                    <th th:text="${#dates.format(hh.c_stardate,'yyyy-MM-dd HH:mm:ss')}"></th>
                    <th th:text="${#dates.format(hh.c_enddate,'yyyy-MM-dd HH:mm:ss')}"></th>
                    <th th:text="${hh.c_costMoney}"> </th>
                    <th th:text="${hh.c_userName}"></th>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
</div>
<script th:src="@{/webjars/jquery/2.1.1/jquery.js}"></script>
<script th:src="@{/js2/jquery.dataTables.min.js}"></script>
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script>
    $(document).ready(function(){
        $(function(){
            $('#tbo').DataTable({
                "aLengthMenu":[2,4,6]
                /*"aaSorting": [
                    [ 1, "desc" ]
                ]//默认第几个排序*/
            });
        });
    });
    function DelTipWidth(Twidth,Theight){
        $(".tip_box",Wparent).css({"width":Twidth+"px","height":Theight+"px","margin-top":-(Theight/2)+"px","margin-left":-(Twidth/2)+"px"});
        $(".tip_close",Wparent).on("click",Tipclose);
    }
    //=====关闭弹出窗
    function Tipclose(){
        $(".tip_box",Wparent).remove(); //移除新增的外层className
        $(".tip_bg",Wparent).remove(); //移除新增的背景className
        window.location.reload();
    }
    var Wparent = window.document;
    var Bg = "<div class='tip_bg tipbg_top'></div>",
        Box = "<div class='tip_box tipbox_top'></div>";

    function shouhuoren(obj){
        $("body",Wparent).append(Bg);
        $("body",Wparent).append(Box);
        var checkId = $(obj).attr("id");
        $(".tip_box",Wparent).prepend("<h2>添加<span class='tip_close'><i class='fa fa-close'>关闭</i></span></h2><div class='tip_tbox'></div>");
        $(".tip_tbox",Wparent).append("<iframe src='/selCost?c_id="+checkId+"' frameborder='0' width='100%' height='100%' seamless></iframe>");
        DelTipWidth(1000,470);
    }
    var zt = $("#ztai").text();
    alert(zt);
    $(function () {
        $("#fabu").click(function () {

        })
    })
</script>


</body>
</html>
